This relates to integrated circuits that serve as packet forwarding devices in networks. Networks such as the internet and other packet-based networks include switches that forward network packets through the networks. In some scenarios, Layer 2 virtual switches (sometimes referred to as VSIs or virtual switching instances) are implemented on switches in the network. A Layer 2 virtual switch provides the switching between ports that are coupled to other network devices (e.g., switches) via network paths. The switches maintain packet forwarding databases (FDBs) that are used to determine how to forward the network packets. L2 switching FDBs associate source MAC addresses with destination ports. Forwarding databases are created through a learning process. In some scenarios the MAC addresses are required to be removed from the forwarding databases. This can be either done periodically through the “aging” process or after a change in the network topology through the “flushing” process which is followed by the “learning” stage. Packet forwarding databases are often flushed on a per-virtual switch instance basis in which all forwarding database entries of a particular virtual switching instance are deleted together. In practice, however, a change in a network topology requires to flush MAC addresses learned on multiple ports. Since each port can be associated with many VSIs, flushing on a per-VSI basis tends to be memory inefficient. For example, a single L2 switching device may have thousands of virtual switching instances that are associated with only a few ports.